<?php

declare(strict_types=1);

namespace App\CustHub\Controller\Admin;

use App\CustHub\Controller\BaseController;
use App\CustHub\Service\ChGetSeatService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Mine\Annotation\Auth;
use Mine\Annotation\Permission;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Http\Message\ResponseInterface;

#[Controller(prefix: "ch/admin/chGetSeat")]
class ChGetSeatController extends BaseController
{
    #[Inject]
    protected ChGetSeatService $service;

    /**
     * 获取席位列表
     * @return ResponseInterface
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    #[GetMapping('index'),Permission('ch:admin:chGetSeat:index')]
    public function getSeat(): ResponseInterface
    {
        return $this->success($this->service->getSeat($this->request->all()));
    }
}